#include<stdio.h>
#include<stdlib.h>
#include<string.h>


// 初始化游戏
void INIT_GAME(void **player, char * name){
    struct Player * player1 = malloc(sizeof(struct Player));
    if(player1 ==NULL){
        printf("初始化失败\n");
        return;
    }
    *player = player1;

}

// 副本战斗
int FIGHT_GAME (void * player, int gameDiff){

}

// 查看玩家信息
void PRINT_GAME(void ** player){

}

// 离开游戏
void EXIT_GAME(void * player){

}


void playGame(INIT_GAME init, FIGHT_GAME fight, PRINT_GAME printGame, EXIT_GAME exitGame){
    // 初始化游戏
    void * player = NULL;
    printf("请输入姓名:\n");
    char username[64];
    scanf("%s", username);
    init(&player,username);

    // 副本难度 变量
    int diff = -1;
    printf("请选择游戏难度:\n");
    printf("1.简单:\n");
    printf("2.中等:\n");
    printf("3.难:\n");
    scanf("%d", &diff);

    // 战斗
    int ret = fight(player ,diff);
    if(ret == 0){
        printf("failed\n");
    }else{
        printf("success\n");
    }

}


void main(){

}